<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      padding: 0;
      margin: 0;
    }

    html {
      font-size: 1vw;
    }

    .con {
      width: 10rem;
      height: 10rem;
      background: yellow;
      margin-left: 5rem;
    }
  </style>
</head>

<body>
  <div class="con">
    盒子
  </div>
</body>

</html>